package com.beta.entity;

import com.baomidou.mybatisplus.annotations.IdType;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

/**
 *
 * 
 *
 */
public class Products implements Serializable {

	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	/**  */
	@TableId(type = IdType.AUTO)
	private Integer id;

	/**  */
	private String name;

	/**  */
	private String description;

	/**  */
	private String chargeUnit;

	/**  */
	private String poster;

	/**  */
	private Date createdAt;

	/**  */
	private Date updatedAt;

	/**  */
	private Date deletedAt;

	/**  */
	private BigDecimal unitWeight;


	public Integer getId() {
		return this.id;
	}

	public Products setId(Integer id) {
		this.id = id;
		return this;
	}

	public String getName() {
		return this.name;
	}

	public Products setName(String name) {
		this.name = name;
		return this;
	}

	public String getDescription() {
		return this.description;
	}

	public Products setDescription(String description) {
		this.description = description;
		return this;
	}

	public String getChargeUnit() {
		return this.chargeUnit;
	}

	public Products setChargeUnit(String chargeUnit) {
		this.chargeUnit = chargeUnit;
		return this;
	}

	public String getPoster() {
		return this.poster;
	}

	public Products setPoster(String poster) {
		this.poster = poster;
		return this;
	}

	public Date getCreatedAt() {
		return this.createdAt;
	}

	public Products setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
		return this;
	}

	public Date getUpdatedAt() {
		return this.updatedAt;
	}

	public Products setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
		return this;
	}

	public Date getDeletedAt() {
		return this.deletedAt;
	}

	public Products setDeletedAt(Date deletedAt) {
		this.deletedAt = deletedAt;
		return this;
	}

	public BigDecimal getUnitWeight() {
		return this.unitWeight;
	}

	public Products setUnitWeight(BigDecimal unitWeight) {
		this.unitWeight = unitWeight;
		return this;
	}

	public String getPosterUrl() {
		return String.join("/", "product", "poster", Objects.toString(this.getId()), this.getPoster());
	}

}
